package com.youdianda.mapper;

import com.youdianda.entity.YddUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface FrontIndexFgxMapper {

    @Select("select * from youdianda.ydd_user where mobile=#{mobile}")
    YddUser getByMobile(String mobile);

    @Select("select * from youdianda.ydd_user where id=#{currentId}")
    YddUser getUserInfo(Long currentId);

    @Select("select count(*) from youdianda.ydd_article where user_id=#{currentId}")
    Integer ArticleNum(Long currentId);

    @Select("select count(*) from youdianda.ydd_user_data where user_id=#{currentId} and type=#{type}")
    Integer collectNum(Long currentId, int type);
}
